﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using nplJobsCommon.Common;
using nplJobsDAL.Select;
using nplJobsDAL.Insert;
using nplJobsCommon;

namespace nplJobsBLL.ProcessJob
{
    public class ProcessJob
    {
        public static Job GetJobDetails(int Id)
        {
            return SelectJobList.GetJobDetails(Id);
        }

        public static int InsertAppliedJob(Int64 jobID, Guid JobSeekerID,float expectedAmount, DateTime AppliedDate)
        {
            return InsertAppliedJobs.Insert(jobID, JobSeekerID, expectedAmount, AppliedDate);
        }

        public static int InsertJobSeekerSavedJob(Int64 jobID, Guid JobSeekerID)
        {
            return nplJobsDAL.Insert.InsertJobSeekerSavedJob.Insert(jobID, JobSeekerID);
        }

        public static bool DeleteJobSeekerSavedJob(Int64 jobID, Guid JobSeekerID)
        {
            nplJobsDAL.Delete.DeleteJobSeekerSavedJobs delete = new nplJobsDAL.Delete.DeleteJobSeekerSavedJobs();
            delete.JobId = jobID;
            delete.JobSeekerId = JobSeekerID;
            delete.invoke();
            return delete.IsDeleted;
        }

        public static List<JobListDetails> GetAppliedJobs(Int64 jobID, Guid JobSeekerID)
        {
            return SelectAppliedJobs.GetAppliedJobs(jobID, JobSeekerID);
        }
    }
}
